package main

import (
	"fmt"
	"os"
	"runtime/pprof"
	"time"
)

func main() {
	fmt.Println("hello world")
	var a Animal
	a.setSex(SexMan)
	fmt.Println(a.info())
	f1, err := os.Create("./cpu.pprof")
	if err != nil {
		return
	}
	pprof.StartCPUProfile(f1)
	for i := 0; i < 5; i++ {
		go CheckAnimalSex()
	}
	time.Sleep(time.Second * 10)
	pprof.StopCPUProfile()
	f1.Close()
}
